<template>
	<view class="content">
		<view class="shop-box">
			<Waterfall :list="goodsList" :columnCount="2" :gap="10">
				<template #default="{ item }">
					<view class="shop-box-item">
						<view class="img">
							<image :src="item.image" mode="widthFix"></image>
						</view>

						<view class="text1">
							泡泡玛特 X 壹橙视觉 labubu和周边泡泡玛特 X 壹橙视觉 labubu和周边
						</view>

						<view class="text2">
							<view class="text2-l">
								<view class="avatar">
									<image src="/static/images/quequanquanbu.png" mode="widthFix"></image>
								</view>

								<view class="nickname">
									布果chacoco布果chacoco
								</view>

							</view>
							<view class="text2-r">
								<!-- <uv-icon name="heart" color="#828999" size="24"></uv-icon> -->
								<!-- 点击收藏 -->
								<uv-icon name="heart-fill" color="#fa2800" size="18"></uv-icon>
								12
							</view>
						</view>
					</view>
				</template>
			</Waterfall>
		</view>

		<view class="title">
			最 新 资 讯
		</view>

		<view class="zixun" v-for="(item,index) in 10" :key="index" hover-class="activeM">
			<view class="zixun-item">
				<view class="img">
					<image src="/static/images/ceshitupian.png" mode="widthFix"></image>
				</view>

				<view class="text1">
					2025年寿州礼物文创产品设计大赛
				</view>

				<view class="text2">
					<view class="text2-l">
						布果chacoco布果chacoco
					</view>
					<view class="text2-r">
						<!-- <uv-icon name="heart" color="#828999" size="24"></uv-icon> -->
						<!-- 点击收藏 -->
						<uv-icon name="heart-fill" color="#fa2800" size="18"></uv-icon>
						12
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import Waterfall from '@/components/Waterfall.vue'
	import {
		ref,
		reactive
	} from 'vue'
	import {
		onLoad,
		onShow
	} from '@dcloudio/uni-app'
	import {
		baseUrl,
		http
	} from '@/utils/request'
	import emitter from '@/utils/emitter.js'
	import {
		showMsg
	} from '@/utils/showMsg'

	const goodsList = ref([{
			image: 'https://picsum.photos/id/1011/200/300',
		},
		{
			image: 'https://picsum.photos/id/1012/200/400',
		},
		{
			image: 'https://picsum.photos/id/1013/200/500',
		},
		{
			image: 'https://picsum.photos/id/1014/200/350',
		},
		{
			image: 'https://picsum.photos/id/1015/200/450',
		},
		{
			image: 'https://picsum.photos/id/1016/200/600',
		}, {
			image: 'https://picsum.photos/id/1017/200/600',
		}, {
			image: 'https://picsum.photos/id/1018/200/600',
		}, {
			image: 'https://picsum.photos/id/1019/200/600',
		}, {
			image: 'https://picsum.photos/id/1020/200/600',
		}, {
			image: 'https://picsum.photos/id/1021/200/600',
		}
	])
</script>

<style lang="scss" scoped>
	.shop-box {
		width: 100%;
		margin-top: 30rpx;
		padding: 0rpx 30rpx;

		.shop-box-item {
			box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
			padding-bottom: 10rpx;
			border-radius: 0rpx 0rpx 8rpx 8rpx;

			.img {
				position: relative;
				width: 100%;

				image {
					width: 100% !important;
					// height: 400rpx !important;
					border-radius: 8rpx 8rpx 8rpx 8rpx !important;
				}
			}


			.text1 {
				width: 100%;
				margin: 20rpx 0rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 2;
				font-weight: 600;
				font-size: 30rpx;
				color: #000000;
				padding: 0rpx 10rpx;
			}

			.text2 {
				width: 100%;
				display: flex;
				padding: 0rpx 10rpx;

				.text2-l {
					width: 60%;
					display: flex;
					align-items: center;
					gap: 10rpx;

					.avatar {
						width: 36rpx;
						height: 36rpx;

						image {
							width: 36rpx !important;
							height: 36rpx !important;
							border-radius: 50% !important;
						}
					}

					.nickname {
						width: calc(100% - 36rpx);
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
						font-weight: 400;
						font-size: 24rpx;
						color: #9095A8;
					}
				}

				.text2-r {
					width: 40%;
					display: flex;
					align-items: center;
					justify-content: flex-end;
					gap: 10rpx;
					font-weight: 400;
					font-size: 24rpx;
					color: #9095A8;
				}
			}
		}
	}

	.title {
		width: 100%;
		font-weight: bold;
		font-size: 32rpx;
		color: #000000;
		margin-top: 80rpx;
		text-align: center;
	}

	.zixun {
		width: 100%;
		margin-top: 30rpx;
		padding: 0rpx 30rpx;

		.zixun-item {
			padding-bottom: 10rpx;
			border-radius: 0rpx 0rpx 8rpx 8rpx;

			.img {
				width: 100%;

				image {
					width: 100% !important;
					height: 392rpx !important;
					border-radius: 10rpx !important;
				}
			}


			.text1 {
				width: 100%;
				margin: 20rpx 0rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 1;
				font-weight: 600;
				font-size: 30rpx;
				color: #000000;
			}

			.text2 {
				width: 100%;
				display: flex;
				padding: 0rpx 10rpx;

				.text2-l {
					width: 60%;
					display: flex;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
					font-weight: 400;
					font-size: 24rpx;
					color: #9095A8;
				}

				.text2-r {
					width: 40%;
					display: flex;
					align-items: center;
					justify-content: flex-end;
					gap: 10rpx;
					font-weight: 400;
					font-size: 24rpx;
					color: #9095A8;
				}
			}
		}
	}
</style>